//
//  SGUserModel.m
//  SGShow
//
//  Created by fanshijian on 15/10/13.
//  Copyright (c) 2015年 fanshijian. All rights reserved.
//

#import "SGUserModel.h"
//#import "RMMapper.h"
#import "YYModel.h"

@implementation SGUserModel

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.company_id forKey:@"company_id"];
    [aCoder encodeObject:self.company_name forKey:@"company_name"];
    [aCoder encodeObject:self.Id forKey:@"Id"];
    [aCoder encodeObject:self.logo forKey:@"logo"];
    [aCoder encodeObject:self.qrcode forKey:@"qrcode"];
    [aCoder encodeObject:self.is_agent forKey:@"is_agent"];
    [aCoder encodeObject:self.state forKey:@"state"];

    [aCoder encodeObject:self.hx_user_name forKey:@"hx_user_name"];
    [aCoder encodeObject:self.hx_password forKey:@"hx_password"];
    [aCoder encodeObject:self.Token forKey:@"userToken"];

    [aCoder encodeObject:self.UserPas forKey:@"userPas"];
    [aCoder encodeObject:self.UserPhone forKey:@"userPhone"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    _company_id = [aDecoder decodeObjectForKey:@"company_id"];
    _company_name = [aDecoder decodeObjectForKey:@"company_name"];
    _Id = [aDecoder decodeObjectForKey:@"Id"];
    _logo = [aDecoder decodeObjectForKey:@"logo"];
    _qrcode = [aDecoder decodeObjectForKey:@"qrcode"];
    _is_agent = [aDecoder decodeObjectForKey:@"is_agent"];
    _state = [aDecoder decodeObjectForKey:@"state"];

    _hx_user_name = [aDecoder decodeObjectForKey:@"hx_user_name"];
    _hx_password = [aDecoder decodeObjectForKey:@"hx_password"];
    _Token = [aDecoder decodeObjectForKey:@"userToken"];
    
    _UserPas = [aDecoder decodeObjectForKey:@"userPas"];
    _UserPhone = [aDecoder decodeObjectForKey:@"userPhone"];

    return self;
}

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"Id" : @"id"};
}

@end

